/*
 * @Descripttion: 
 * @version: 
 * @Author: weihua.yao
 * @Date: 2020-03-06 09:56:10
 * @LastEditTime: 2020-05-31 17:35:41
 */

 setTimeout(()=>{
   var a = 'hi'
   setTimeout(()=>{
     var b ="lou"
     setTimeout(()=>{
       var c ="james"
       console.log(a+b+c)
     },10)
   },10)
 },10)

p1 = new Promise((resolve, reject)=>{
  var a = 'z'
  resolve(a)
})

p1.then((result)=>{
  var b ="z"
  return result+b
}).then((result)=>{
    var c ="z"
    return result+c
  }
).then(console.log)




function print(fn){
  let a = 200
  function fn(){
    console.log(a)
  }
  fn()
}

let a = 100 


print(fn)